package com.nectia.certificacion.scjp;

public class Exercise14 {

	public static void main(String args[]) {
		
		try {
			
			A a = new A();
			Thread t = new Thread(a);
			t.start();
//			a.wait();
//			t.wait();
			t.join();
//			t.yield();
//			t.notify();
//			a.notify();
//			t.interrupt();
			int j = a.i;
			System.out.println(j);
		} catch (Exception e) {
			System.out.println(e.getMessage());
			
		}
	}
	}

class A implements Runnable {
	
	int i;
	
	public void run() {
		try {
			
			Thread.sleep(5000);
			i = 10;
		} catch (InterruptedException e) {
			System.out.println(e.getMessage());
		}				
		
	}
}
